package com.itheima.health.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.health.dao.MenuDao;
import com.itheima.health.pojo.Menu;
import com.itheima.health.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl extends ServiceImpl<MenuDao, Menu> implements MenuService {
    @Autowired
    private MenuDao menuDao;
    @Override
    public List<Menu> findL1Menu(Integer roleId) {
        return menuDao.selectL1Menu(roleId);
    }

    @Override
    public List<Menu> findL2Menu(Integer roleId,Integer parentMenuId) {
        return menuDao.selectL2Menu(roleId,parentMenuId);
    }
}
